/**
 * 关于我们
 */
define(function (require) {
    var $ = require('jquery');
    var base = require('base');
    var com = require('./common');

    if(localStorage.getItem("lang")){
		var Lang = localStorage.getItem("lang")
	}else{
		var Lang = "zh_CN"
	}

	// 中文/英文转换
	if(Lang != "zh_CN"){
		$('#banner_text').html("About Us")
		$('#Culture').html("Culture")
		$('#Develop_History').html("Develop History")
		$('#Certificate').html("Certificate")

	}




    // 荣誉资质
	$.ajax(seajs.ajaxroot + "getCert", {
		type: 'post',
        async:false,
		headers:{
			'locale-language': Lang,
            "Content-Type":"multipart/form-data"
		},   
        success:function(res){
            console.log("getCert:", res)
            let cert = '';
            res.data.forEach(item=>{
                cert += '<div class="swiper-slide"><div class="rect-125">';
                cert += '<img src="'+item.img+'" class="_full" alt="">';
                cert += '<div class="txt">'+item.title+'</div></div>';
                cert += '</div>';
            })
            $('#honer_content').html(cert)
        } 
    })



    // 第六部分
    var swiper06 = new Swiper('.about_center06 .swiper-container', {
        slidesPerView: 3,
        spaceBetween: 30,
        centeredSlides: true,
        loop: true,
        observer: true,//修改swiper自己或子元素时，自动初始化swiper
        observeParents: true,//修改swiper的父元素时，自动初始化swiper
        pagination: {
            el: '.swiper-pagination',
            clickable: true,
        },
        navigation: {
            nextEl: '.swiper-button-next',
            prevEl: '.swiper-button-prev',
        },
        breakpoints: {
            320: {  //当屏幕宽度大于等于320
                slidesPerView: 1,
                spaceBetween: 0
            },
            760: {  //当屏幕宽度大于等于768 
                slidesPerView: 2,
                spaceBetween: 20
            },
            1280: {  //当屏幕宽度大于等于1280
                slidesPerView: 3,
                spaceBetween: 30
            }
        }
    });


    // //点击图集
    // require('album');
    // $('.about_center06 .content').album({
    //     cell: '.swiper-slide',
    //     title: '.txt'
    // });




})